1. Field of the Invention
The invention relates in general to a writing method for a solid state disk, and more particularly to a writing method for a solid state disk in which data is reordered in a buffer memory before being written to a non-volatile memory.
2. Description of the Related Art
Solid state disk (SSD) is formed by integrating a plurality of non-volatile memories (NVMs) into a single storage device. The solid state disk, having a fast data transmission rate which is beneficial to the transmission of a large volume of data, has become an essential data storage device to modern computer systems.
As indicated in FIG. 1, a schematic diagram of a data writing procedure of a solid state disk according to prior art is shown. A host, such as a computer system, uses a processor to output writing data with logical allocation address (LAA) such as writing data LAA(0, 8, 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 14, 15). The writing data is received by a controller of a solid state disk and buffered in a buffer memory. Based on the order of reception, the writing data which correspond to non-volatile memories 0-7 are divided into a plurality of writing units, such as writing unit 1 and writing unit 2, wherein the writing data 1 is LAA (0, 8, 2, 3, 4, 5, 6, 7), and the writing data 2 is LAA (1, 9, 10, 11, 12, 13, 14, 15). Then, the writing data are distributed to writing units and stored to corresponding non-volatile memories in parallel via respective first in first out (FIFO) channels of non-volatile memories 0-7, such that the write rate can be increased.
When reading data, the solid state disk receives a read request from the host, and distributes the read request and registers it in respective read request queues of the non-volatile memories. Then, based on the order of the read request in the read request queues, the data stored in the non-volatile memories are read in parallel on a FIFO basis, and are outputted via respective FIFO channels. The outputted data are arranged by the controller and stored in a dynamic random access memory (DRAM) of the host. Therefore, through the use of respective FIFO channels of the non-volatile memories, the solid state disk can read data in parallel via multi-channels to increase the read rate.
However, when the host needs to read data LAA(0,1,2,3,4,5,6,7), the non-volatile memory 0 cannot read and output two required data LAA(0,1) because each non-volatile memory of the solid state disk is restricted by its corresponding FIFO channel. In the first schedule, the non-volatile memory 0 can only read data LAA(0) and output LAA(0) together with LAA(2,3,4,5,6,7) read by the non-volatile memories 2,3,4,5,6,7 in parallel. In the second schedule, the non-volatile memory 0 alone reads and outputs data LAA(1). Under such design, the solid state disk takes a longer time to read data, and multi-channel parallel reading efficiency of the solid state disk will be reduced.
The solid state disk distributes the received writing data to each non-volatile memory and further uses parallel multi-channels to increase the writing rate. However, when data is written based on the order of reception alone, different writing data with continuous or similar logical allocation addresses may be written to the same non-volatile memory. When reading data, due to the jamming in the FIFO channel, the overall read/write efficiency of the solid state disk will deteriorate. Therefore, the solid state disk still has many problems to tackle with when it comes to the writing method.